| Conditions | 2 |
| Total Lines | 9 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { Controller, Inject, UseGuards, Get, Param, NotFoundException } from '@nestjs/common'; |
||
| 21 | |||
| 22 | @Get(':id/shootings') |
||
| 23 | @Roles(UserRole.PHOTOGRAPHER) |
||
| 24 | @ApiOperation({ summary: 'Get school shootings' }) |
||
| 25 | public async index(@Param() dto: IdDTO): Promise<ShootingSummaryView[]> { |
||
| 26 | try { |
||
| 27 | return await this.queryBus.execute(new GetShootingsBySchoolQuery(dto.id)); |
||
| 28 | } catch (e) { |
||
| 29 | throw new NotFoundException(e.message); |
||
| 30 | } |
||
| 33 |